<!-- src/components/HeaderComponent.vue -->
<template>
  <header class="header">
    <h1>教育平台录播课商城</h1>
    <div class="header-right">
      <input type="text" placeholder="输入关键字进行搜索">
      <button class="search-btn">搜索</button>
      <div class="cart-icon">🛒 <span class="badge">9</span></div>
    </div>
  </header>
</template>
<script>
// 必须添加空的 script 部分
export default {}
</script>
<style scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #f5f5f5;
}
.header-right {
  display: flex;
  align-items: center;
}
.cart-icon {
  position: relative;
  margin-left: 10px;
}
.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: red;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
